package com.yswy.backstage.controller.api;


import com.yswy.backstage.annotation.NotAuth;
import com.yswy.backstage.serviceApi.ApiPackageManageService;
import com.yswy.common.model.ResultModel;
import com.yswy.domain.vo.gld.list.PackageManageLogList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/appPackage")
@Api(tags = "app版本")
@Slf4j
public class ApiAppPackagetController {
    @Autowired
    private ApiPackageManageService packageManageService ;
    @GetMapping("/latestPackage")
    @ApiOperation(value = "获取最新的版本")
    @NotAuth
    public PackageManageLogList delAppProject(@RequestParam(value = "projectId") Long projectId
            , @RequestParam(value = "channel") String channel) {
        ResultModel.ok();

        return packageManageService.getLatestPackageVersion(projectId , channel);
    }
}
